<?php

	include("errorReporting.php");

	include("unidefconf.php");

	if($_GET['pass']!=$pass){
		echo "success=false&errorText=bad password";
		exit;
	}
	
	if(file_exists($binaryXMLFilename)) {
		rename($binaryXMLFilename, 'backup/'.date("Y-m-d_h-i-s")."_".$binaryXMLFilename);
	}

	$file = $GLOBALS["HTTP_RAW_POST_DATA"];
	$rFile = fopen($binaryXMLFilename,'w+');
	fputs($rFile, $file);
	fclose($rFile);
	
	echo 'success=1&filesize='.filesize($binaryXMLFilename);

?>